import qs from 'qs'

export default ({ $uploadService: uploadService }) => ({
  upload(file) {
    let fd = new FormData()
    fd.append('file', file)
    return uploadService({
      url: `/api/file/upload`,
      method: 'post',
      data: fd
    })
  },
})
